﻿@model DistanceLearning.Models.Quarter[]

@{
    AjaxOptions ajaxOptions = new AjaxOptions {
        //UpdateTargetId = "subjects_list",
        Url = Url.Action("SaveQuarters", "Administration"),
        HttpMethod = "POST",
        
    };
}
<h2>Учебные четверти</h2>

@using(Ajax.BeginForm(ajaxOptions))
{
    //@Html.HiddenFor(x => x[0].QuarterID)
    <div class="edit_form">
        @for (int i = 0; i < Model.Length; ++i)
        {
            int j = i;
            @Html.HiddenFor(x => x[i].QuarterID)
            
            <div class="line">
                <a>@(i + 1) четверть</a>
             </div>
            <div class="line">
                
                @Html.DevExpress().Label(s => { s.Text = "Начало"; }).GetHtml()
                @Html.DevExpress().DateEditFor(x => x[j].StartDate, settings => { }).GetHtml()
                </div>
            <div class="line">
                @Html.DevExpress().Label(s => { s.Text = "Конец"; }).GetHtml()
                @Html.DevExpress().DateEditFor(x => x[j].EndDate, settings => { }).GetHtml()
            </div>

        }
       <div class="line">
            <input type="submit" value="Изменить"/>
        </div>
    </div>
}